* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Menlo;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;

  min-height: 100vh;
  background-color: #ededed;
}

.road {
  display: flex;
  justify-content: center;
  align-items: center;

  width: 700px;
  height: 150px;
  background-color: #333;
  border-radius: 75px;

  transform-style: preserve-3d;
  perspective: 500px;

  position: relative;
}
.road::before {
  content: "";

  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    #fff,
    #fff 50%,
    transparent 50%,
    transparent 100%
  );
  background-size: 50px;

  position: absolute;

  animation: animate-road 0.1s linear infinite;
}
@keyframes animate-road {
  0% {
    background-position: 50px 0;
  }
  100% {
    background-position: 0 0;
  }
}

.taxi {
  width: 200px;
  height: 80px;
  background-color: #f4b603;
  border-radius: 10px;
  box-shadow: -10px 10px rgba(0, 0, 0, 0.2);

  transform-style: preserve-3d;
  perspective: 800px;

  position: absolute;
  left: 50px;
  z-index: 10;

  animation: animate-taxi 2s linear infinite;
}
.taxi:nth-child(2) {
  left: initial;
  right: 150px;
  z-index: 9;

  animation: animate-taxi 4s linear infinite;
  animation-delay: -1s;
}
@keyframes animate-taxi {
  0% {
    transform: translate(20px, -20px);
  }
  25% {
    transform: translate(-10px, 0);
  }
  50% {
    transform: translate(20px, 20px);
  }
  75% {
    transform: translate(-10px, 0);
  }
  100% {
    transform: translate(20px, -20px);
  }
}
.taxi::before {
  content: "";

  width: 5px;
  height: 15px;
  background-color: #fc3c25;
  border-radius: 2px;
  box-shadow: 0 42px #fc3c25;

  position: absolute;
  top: 12px;
  left: 2px;
}
.taxi::after {
  content: "";

  width: 5px;
  height: 16px;
  background-color: #fff;
  border-radius: 2px;
  box-shadow: 0 44px #fff;

  position: absolute;
  top: 10px;
  right: 2px;
}

.taxi .top {
  inset: 5px 10px;
  background-color: #fdd206;
  border-radius: 10px;
  overflow: hidden;

  position: absolute;
}
.taxi .top::before {
  content: "taxi";

  background-color: #fff;
  padding: 2px;
  font-size: 0.75em;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: 0 0 0 1px #0005;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  z-index: 10;
}
.taxi .top b {
  inset: 0 30px;
  background-color: #111;
  border-radius: 10px;

  position: absolute;
}
.taxi .top b::before {
  content: "";

  inset: 6px 25px;
  background-color: #fdd206;
  border-radius: 5px;

  position: absolute;
}
.taxi .top b::after {
  content: "";

  inset: 0 58px;
  background-color: #fdd206;

  position: absolute;
}
.taxi .top i {
  inset: 0;

  position: absolute;
}
.taxi .top i::before {
  content: "";

  width: 40px;
  height: 5px;
  background-color: #fdd206;
  transform-origin: right;
  transform: rotate(15deg);
  box-shadow: 100px 34px #fdd206;

  position: absolute;
  top: 7px;
  left: 20px;
}
.taxi .top i::after {
  content: "";

  width: 40px;
  height: 5px;
  background-color: #fdd206;
  transform-origin: right;
  transform: rotate(-15deg);
  box-shadow: 100px -34px #fdd206;

  position: absolute;
  bottom: 7px;
  left: 20px;
}

.taxi .light {
  width: 10px;
  height: 70px;
  background-color: #0002;
  border-radius: 15px;
  transform-style: preserve-3d;

  position: absolute;
  top: 5px;
  right: -2px;
}
.taxi .light::before {
  content: "";

  width: 150px;
  height: 16px;
  background: linear-gradient(90deg, #fff6, transparent);
  transform-origin: left;
  transform: perspective(500px) rotateY(-50deg);

  position: absolute;
  top: 5px;
  left: 0;
}
.taxi .light::after {
  content: "";

  width: 150px;
  height: 16px;
  background: linear-gradient(90deg, #fff6, transparent);
  transform-origin: left;
  transform: perspective(500px) rotateY(-50deg);

  position: absolute;
  bottom: 5px;
  left: 0;
}
